import request from '@/utils/request'

// 查询区域报警列表
export function listAreaAlarms(params) {
  return request({
    url: '/dispatch/dispatch/dispatchAreaAlarm/list',
    method: 'get',
    params
  })
}

// 获取区域报警详情
export function getAreaAlarmDetail(areaAlarmId) {
  return request({
    url: `/dispatch/dispatch/dispatchAreaAlarm/${areaAlarmId}`,
    method: 'get'
  })
}

// 处理报警状态
export function handleAlarmStatus(params) {
  return request({
    url: '/dispatch/dispatch/dispatchAreaAlarm/handleAlarmStatus',
    method: 'put',
    params
  })
}

// 获取报警类型下拉列表
export function getAlarmTypeSelect() {
  return request({
    url: '/dispatch/dispatch/dispatchAreaAlarm/alarm/typeList',
    method: 'get'
  })
}

// 获取报警等级下拉列表
export function getAlarmLevelSelect() {
  return request({
    url: '/dispatch/dispatch/dispatchAreaAlarm/alarm/levelList',
    method: 'get'
  })
}